package com.cyy.api.controller;

import com.cyy.common.domain.Response;
import com.cyy.common.pojo.vo.api.ApiTagsVo;
import com.cyy.common.service.TagsService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author caoyunyou
 */
@Tag(name = "标签-API", description = "标签-API")
@RestController
@RequestMapping("/v1/tags")
@RequiredArgsConstructor
public class ApiTagsController {

    private final TagsService tagsService;


    @Operation(summary = "获取页面展示标签信息")
    @GetMapping("/list")
    public Response queryList() {
        List<ApiTagsVo> tags = tagsService.queryList();
        return Response.success().data(tags);
    }

}
